import { request } from '@/utils/request.js'; //导入封装好的js文件

// 创建班级
export const createClassApi = (data) => {
  return request({
    url: '/class/add',
    method: 'post',
    data
  });
};

// 获取班级列表
export const getClassListApi = () => {
  return request({
    url: '/class/list',
    method: 'get'
  });
};

// 获取班级详情
export const getClassDetailApi = (classCode) => {
  return request({
    url: `/class/${classCode}`,
    method: 'get'
  });
};

// 获取班级学生列表
export const getStudentListApi = (classCode) => {
  return request({
    url: `/class/studentList/${classCode}`,
    method: 'get'
  });
};
